﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Team6_Algorithms;
using Team6_Algorithms.Filters;
using System.Drawing;

namespace VisionApplication
{
    class LineDetection: VisionAlgorithm
    {
        public Masks m = new Masks();
        List<Mask> ML = new List<Mask>();
        public LineDetection(String name, string[] required)
            : base(name, required)
        {
            ML.Add(m.LineDetection1);
            ML.Add(m.LineDetection2);
            ML.Add(m.LineDetection3);
            ML.Add(m.LineDetection4);
        }

        public override System.Drawing.Bitmap DoAlgorithm(System.Drawing.Bitmap sourceImage, Object obj)
        {
            Bitmap returnImage = new Bitmap(sourceImage);

            CombinedMasking.applyFilter(returnImage, ML,settings.Max);
            this.Image = returnImage;
            return returnImage;

        }
    }
}
